# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-plasma
pkgname=sddm-kcm
pkgver=5.27.10
pkgrel=0
pkgdesc="Config module for SDDM"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://www.kde.org"
license="GPL-2.0-or-later AND (GPL-2.0-only OR GPL-3.0-only) AND LGPL-2.1-or-later AND GPL-2.0-only"
depends="
	sddm
	systemsettings
	"
makedepends="
	extra-cmake-modules
	karchive5-dev
	kauth5-dev
	kcmutils5-dev
	kconfigwidgets5-dev
	kcoreaddons5-dev
	kdeclarative5-dev
	ki18n5-dev
	kio5-dev
	knewstuff5-dev
	kxmlgui5-dev
	libxcursor-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtx11extras-dev
	samurai
	xcb-util-image-dev
	"

case "$pkgver" in
	*.90*) _rel=unstable;;
	*) _rel=stable;;
esac
_repo_url="https://invent.kde.org/plasma/sddm-kcm.git"
source="https://download.kde.org/$_rel/plasma/$pkgver/sddm-kcm-$pkgver.tar.xz"
subpackages="$pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
2dcb3d5c5b5bfb40564b5609b0901b5ae181ef3595d95220ffb8a8139f85850b3461199ac91234d986bac852e193ae2670a2168c3d292818e2b8e11bcb1f72a8  sddm-kcm-5.27.10.tar.xz
"
